package com.zjitc.service.impl;

import com.zjitc.mapper.CountryMapper;
import com.zjitc.model.Country;
import com.zjitc.service.CountryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by 沈银 on 2018/3/20.
 */
@Service
public class CountryServiceImpl implements CountryService{
    @Autowired
    private CountryMapper countryMapper;
    @Override
    public List<Country> findAllCountry() {
        return countryMapper.findAllCountry();
    }

  @Override
  public int addAll(Country country) {
    return countryMapper.addAll(country);
  }

  @Override
  public int delete(String code) {
    return countryMapper.delete(code);
  }

  @Override
  public Country findByCode(String code) {
    return countryMapper.findByCode(code);
  }

  @Override
  public int edit(Country country) {
    return countryMapper.edit(country);
  }

  @Override
  public List<Country> findByCondition(String condition) {
    return countryMapper.findByCondition(condition);
  }
}
